{extend name="default/template/base_index" /}


{block name="area_header"}
	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}
			<div class="table-responsive well">
				<div class="h4">
				</div>
				<div class="form-control-static">
					<form action="{:url('Log/index')}" method="post" class="form-inline">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<i class="fa fa-calendar"></i>
								</div>
								<input type="text" name="startdatetime" id="startdatetime" class="form-control" value="{:date('Y/m/d H:i',$startdatetime)}" />
								<div class="input-group-addon">
									<i class="fa fa-long-arrow-right"></i>
								</div>
								<input type="text" name="enddatetime" id="enddatetime" class="form-control" value="{:date('Y/m/d H:i',$enddatetime)}" />
							</div>
						</div>
						<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
					</form>
				</div>
				<div class="form-control-static">
					<a href="{:url('Log/clearall')}" class="confirm ajax-get btn btn-danger btn-sm" target-form="selectitem">清空</a>
				</div>
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />{:L('SELECT_ALL')}
								<th>
									{:L('VIEW_DATETIME')}
								</th>
								<th>
									{:L('VIEW_INFO')}
								</th>
								<th>
									{:L('OPERATOR')}
								</th>
						</tr>
					</thead>
					<tbody>
						{empty name="list"}
							<tr>
								<td colspan="4" class="text-center">{:L('NO_DATA')}</td>
							</tr>
						{/empty}
						{volist name="list" id="vo"}
						<tr>
								<td>
									<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" />{$vo.id}</td>
								<td>{$vo.timestamp|date="Y/m/d H:i:s",###}</td>
								<td>{$vo.info}</td>
								<td>
									<a href="{:url(CONTROLLER_NAME .'/view',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i>{:L('BTN_VIEW')}</a>
									<a href="{:url(CONTROLLER_NAME .'/delete',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get confirm"><i class="fa fa-trash-o"></i> {:L('BTN_DELETE')}</a>
								</td>
							</tr>

						{/volist}
					</tbody>
				</table>
				<div>
					{$show}
				</div>
			</div>

		</div>
	</div>
{/block}

{block name="area_footer"}
	<script type="text/javascript">
		$(function() {
			$('#startdatetime').datetimepicker({
				lang: 'ch'
			});
			$('#enddatetime').datetimepicker({
				lang: 'ch'
			});
		})
	</script>
{/block}